/*
 * JspElement.h
 *
 *  Created on: 2010-6-6
 *      Author: guobc
 */

#ifndef JSPELEMENT_H_
#define JSPELEMENT_H_

#include "CommonElement.h"

namespace HA {
class JspElement: public HA::CommonElement {
public:
	JspElement();

	/**
	 * Sets string contents of the node
	 * @param text The new text for the node
	 */
	inline void setText(const string& text) {
		mText = text;
	}

	/**
	 * Get the set of names handles by this element.
	 * @return The names to be matched that create elements of this type.
	 */
	inline string* getIds() const {
		return mIds;
	}

	inline string toHTML() const {
		return "<" + mName + mText + "%>";
	}

	/**
	 * Allow creating an instance of this node.
	 * @return A new instance of this node.
	 */
	inline ASTNode* newInstance() const {
		return new JspElement();
	}

private:
	string mText;
	static string mIds[];
};
}
#endif /* JSPELEMENT_H_ */
